package router

import (
	"github.com/gin-gonic/gin"
	"me/123/api/handler"
	"me/123/api/middleware"
	"me/123/common/pkg"
)

func LoadRouter(r *gin.Engine) {
	r.POST("/callback", handler.Callback)
	r.POST("/login", handler.Login)
	r.GET("/productList", handler.ProductList)
	r.POST("/list", handler.List)
	r.Use(middleware.Middleware())
	r.Use(pkg.JWTAuth("2209a"))
	r.POST("/orderCreate", handler.OrderCreate)
	r.POST("/collectVoucher", handler.CollectVoucher)
	r.GET("/userList", handler.UserList)
}
